<template>
  <div class="loading_box">
      <div class="loading" v-if="loadingState">
          <van-loading size="20" color="#919191" /><span>玩命加载中...</span>
      </div>
      <div class="over" v-else>
          <p class="line"></p>
          <p class="name">商品加载完了哦</p>
          <p class="line"></p>
      </div>
  </div>
</template>

<script>
export default {
    props:{
        loadingState:{
            type: Boolean,
            default: false,
        }
    },
    watch:{
        loadingState(state){
            return state
        }
    }
}
</script>

<style lang="scss" scoped>
.loading_box{
    text-align: center;
    height: 100rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    // padding-top:30rpx;
    .loading{
        display: flex;
        align-items: center;
        justify-content: center;
        color:#919191;
        font-size:28rpx;
        span{
            margin-left:30rpx;
        }
    }
    .over{
        display: flex;
        align-items: center;
        justify-content: center;
        .line{
            width: 100rpx;
            height: 1px;
            background: #ccc;
        }
        .name{
            font-size:28rpx;
            color:#919191;
            margin:0 30rpx;
        }
    }
}
</style>